import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int n = in.nextInt();
            int m = in.nextInt();
            int ret = med(n,m);
            System.out.println(ret);
        }
    }

    public static int med(int n,int m){
        if ((n == 1 && m >= 1)||( m == 1 && n >= 1)) {
            return n+m;
        }
        return med(n-1,m)+med(n,m-1);
    }
}